package kr.hkit.powerjava.chapter22;

import java.util.Collections;
import java.util.LinkedList;

public class LinkedListTest {
	public static void main(String[] args) {
		LinkedList<String> arList = new LinkedList<>();
		arList.add("Milk");
		arList.add("Bread");
		arList.add("Butter");
		
		arList.add(1, "Apple");
		arList.add(2, "Grape");
		
		String temp = arList.remove(0);
		System.out.println("제거된 문자열"+ temp);
		
		Collections.sort(arList);
		for(String str:arList){
			System.out.println(str);
		}
		
	}
}
